<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <p:panel header="Detalle de Practicante " style="border: none;">
        <div align="center">

            <h:form id="dataForm" style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <p>
                    <h:panelGrid columns="3" >
                        <p:graphicImage value="/resources/images/studentSearch.png" width="40px"/>
                        <h:outputText value="CODIGO DEL ALUMNO : #{practiceDetailBean.practice.codeAlumn}"/> 
                        <p:graphicImage value="/resources/images/studentSearch.png" width="40px"/>
                    </h:panelGrid>
                </p>
            </h:form><br/>

            <!--mostrando los tipos de comisiones -->
            <h:form id="listForm" 
                    style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <br/>
                <p:panelGrid style="width: 98%" >
                    <p:row>
                        <p:column style="width: 100px">
                            <p:graphicImage value="/resources/images/student.png" width="150px">
                            </p:graphicImage>
                        </p:column>
                        <p:column>
                            <p:panelGrid columns="4" style="width: 100%">
                                <f:facet name="header">  
                                    DATOS PERSONALES DEL ALUMNO
                                </f:facet>
                                <h:outputLabel value="COMPAÑIA : " />  
                                <h:outputLabel value="#{practiceDetailBean.practice.idCompany.name}" style="color: #069"/>
                                <h:outputLabel value="ÁREA : " />  
                                <h:outputLabel value="#{practiceDetailBean.practice.nameArea}" style="color: #069"/>
                                <h:outputLabel value="JÉFE. :" />
                                <h:outputLabel value="#{practiceDetailBean.practice.inmmediativeBoss}" style="color: #069"/>
                                <h:outputLabel value="TITULO PROYECTO :" />
                                <h:outputLabel value="#{practiceDetailBean.practice.titleProject}" style="color: #069"/>
                                <h:outputLabel value="DESCRIPCIÓN PROYECTO :" />
                                <h:outputLabel value="#{practiceDetailBean.practice.summaryProject}" style="color: #069"/>
                                <h:outputLabel value="ASESOR :" />
                                <p:commandLink value="#{practiceDetailBean.practice.idAdviserPractice.nameAdviser}" 
                                               style="color: blue;" oncomplete="yearW.show();">
                                    <f:setPropertyActionListener value="PDF" target="#{practiceDetailBean.exportOption}"/>
                                </p:commandLink>
                                <h:outputLabel value="DÍA INICIO :" />
                                <h:outputLabel value="#{practiceDetailBean.practice.startDate}" style="color: #069">
                                    <f:convertDateTime parent="dd/MM/yyyy"/>
                                </h:outputLabel>
                                <h:outputLabel value="DÍA FINAL:" />
                                <h:outputLabel value="#{practiceDetailBean.practice.endDate}" style="color: #069">
                                    <f:convertDateTime parent="dd/MM/yyyy"/>
                                </h:outputLabel>
                                <h:outputLabel value="ESTADO ACTUAL: "/>
                                <h:outputLabel value="#{practiceDetailBean.practice.idHistoryPractice.idState.name}" style="color: #069"/>
                            </p:panelGrid>
                        </p:column>
                    </p:row>
                </p:panelGrid>
            </h:form>
            <br/>
            <h:form id="listForm3" rendered="#{practiceDetailBean.practice.functionPracticeList.size() != 0}"
                    style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <p><h:outputText value="FUNCIONES DEL PRATICANTE" style="font-weight: bold; font-size: 18px; color:#069;"/></p>

                <p:dataList value="#{practiceDetailBean.practice.functionPracticeList}" 
                            var="function" itemType="circle" id="funcdlId" >
                    <h:outputText value="#{function.detail}" style="padding-right: 100px;" />                  
                </p:dataList>
            </h:form>
            <br/>
            <h:form id="listForm7" rendered="#{practiceDetailBean.practice.amplificationPracticeList.size() != 0}"
                    style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <p><h:outputText value="AMPLIACIONES DEL PRATICANTE" style="font-weight: bold; font-size: 18px; color:#069;"/></p>


                <p:dataTable value="#{practiceDetailBean.practice.amplificationPracticeList}" 
                             var="amplification">
                    <p:column>
                        <h:outputText value="#{amplification.newDate}" style="padding-right: 100px;" >
                            <f:convertDateTime parent="dd/MM/yyyy"/>
                        </h:outputText>
                    </p:column>
                    <p:column>
                        <h:outputText value="#{amplification.motive}"  />                  
                    </p:column>
                </p:dataTable>
            </h:form>
            <br/>
            <h:form id="listForm2" style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <p><h:outputText value="HISTORIAL" style="font-weight: bold; font-size: 18px; color:#069;"/></p>

                <p:dataTable value="#{practiceDetailBean.practice.historyPracticeList}" 
                             var="history" >
                    <p:column>
                        <h:outputText value="#{history.idState.name}" style="padding-right: 100px;" />
                    </p:column>
                    <p:column>
                        <h:outputText value="#{history.date}" style="padding-right: 100px;">
                            <f:convertDateTime parent="dd/MM/yyyy"/>
                        </h:outputText>
                    </p:column>
                    <p:column>
                        <h:outputText value="#{history.detail}"/>
                    </p:column>
                </p:dataTable>
            </h:form>
            <br/>
            <h:form id="listFormF" rendered="#{practiceDetailBean.practice.supervisionPracticeList.size() != 0}"
                    style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <p><h:outputText value="DOCENTES DE SUPERVISIÓN" style="font-weight: bold; font-size: 18px; color:#069;"/></p>

                <p:dataTable value="#{practiceDetailBean.practice.supervisionPracticeList}" 
                             var="supervision"  >

                    <p:column>
                        <h:outputText value="#{supervision.codeTeacher}" style="padding-right: 100px;" />
                    </p:column>
                    <p:column>
                        <h:outputText value="#{supervision.date}" style="padding-right: 100px;">
                            <f:convertDateTime parent="dd/MM/yyyy"/>
                        </h:outputText>
                    </p:column>
                    <p:column>
                        <h:outputText value="#{supervision.detail}"/>
                    </p:column>
                </p:dataTable>
            </h:form>
            <br/>

            <h:form id="listFormXF" rendered="#{practiceDetailBean.practice.reportPracticeList.size() != 0}"
                    style="border-style: solid; border-color: #069; font-weight: bold; width: 99%">
                <p><h:outputText value="REPORTE DE PRACTICANTE" style="font-weight: bold; font-size: 18px; color:#069;"/></p>

                <p:dataTable value="#{practiceDetailBean.practice.reportPracticeList}" 
                             var="report" >
                    <p:column>
                        <h:outputText value="#{report.idState.name}" style="padding-right: 100px;" />
                    </p:column>
                    <p:column>
                        <h:outputText value="#{report.filingDate}" style="padding-right: 100px;">
                            <f:convertDateTime parent="dd/MM/yyyy"/>
                        </h:outputText>
                    </p:column>
                    <p:column>
                        <h:outputText value="#{report.detail}"/>
                    </p:column>

                </p:dataTable>
            </h:form>
        </div>
    </p:panel>

    <p:dialog modal="true" appendTo="@(body)" widgetVar="yearW">
        <div align="center">
            <h:form target="_blank" >
                <p:inputText value="#{practiceDetailBean.year}" size="40" required="true" label="Año"/>
                <p:commandButton value="Ver Reporte" ajax="false" 
                                 actionListener="#{practiceDetailBean.execute}" />
        </h:form>

    </div>
</p:dialog>

</ui:composition>
